package com.edoomath.api.servcice;

import java.util.List;
import java.util.Map;

import com.demo2do.core.persistence.annotation.Variable;
import com.edoomath.entity.course.Course;
import com.edoomath.entity.course.CourseAttribute;
import com.edoomath.entity.course.CourseMaterail;
import com.edoomath.entity.course.CourseVersion;

public interface CourseService extends DataService<Course> {
	
	/**
	 * 
	 * @param course
	 * @return
	 */
	public CourseVersion loadVersion(Course course);
    
    /**
     * 
     * @param course
     * @return
     */
    public Map<String, List<CourseMaterail>> listMaterials(@Variable("course") Course course);
    
    /**
     * 
     * @param course
     * @param type
     * @return
     */
    public List<CourseMaterail> listCourseMaterial(Course course, String type);
    
    /**
     * 
     * @param materialIds
     * @return
     */
    public List<CourseMaterail> listCourseMaterial(List<Long> materialIds);
    
    /**
     * 
     * @param course
     * @return
     */
    public Map<String, Map<String, List<CourseMaterail>>> listItemMaterials(@Variable("course") Course course);
    
    /**
     * 
     * @param course
     * @return
     */
    public List<CourseAttribute> listAttrs(@Variable("course") Course course);
    
    /**
     * 
     * @param courses
     * @return
     */
    public Map<String, Map<String, CourseAttribute>> listAttrs(@Variable("courses") List<Course> courses);
    
    /**
     * 
     * @param course
     * @param type
     * @return
     */
    public CourseMaterail loadMaterialZip(Course course, String type);
}
